package com.example.demo.service;

import com.example.demo.entity.Datas;

import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;

public class DataService {
    public Map<String,String> getDatas(String name, Course2Service course2Service,String jxb_ids,String kcmc_tmp,String kch_id) throws IllegalAccessException {
        Datas datas = new Datas(name,course2Service,jxb_ids,kcmc_tmp,kch_id);
        Map<String,String> map = new HashMap<>();
        Field[] fields = datas.getClass().getDeclaredFields();
        for(Field field : fields){
            field.setAccessible(true);
            map.put(field.getName(),field.get(datas).toString());
        }
        return map;
    }
}
